package game;

import java.awt.Graphics;
import java.awt.geom.Point2D;

public class Menu extends Scene{
	
	Button play;
	Button instruction;
	Button credits;
	Background bg;
	
	public Menu()
	{
		play = new Button(8, new Point2D.Double(315, 0), new Point2D.Double(150, 150),
							 new Point2D.Double(0, 0), new Point2D.Double(150, 150));
		
		instruction = new Button(8, new Point2D.Double(545, 360), new Point2D.Double(150, 150),
				 new Point2D.Double(150, 0), new Point2D.Double(150, 150));
		
		credits = new Button(8, new Point2D.Double(60, 360), new Point2D.Double(150, 150),
				 new Point2D.Double(300, 0), new Point2D.Double(150, 150));
		
		bg = new Background(9, new Point2D.Double(0, 0), new Point2D.Double(800, 600));
	}

	@Override
	public void update() {
		// TODO Auto-generated method stub
		play.update();
		instruction.update();
		credits.update();
		if (play.released == true)
		{
			SceneManager.changeScene(0);
		}
		if (instruction.released == true)
		{
			SceneManager.changeScene(1);
		}
		if (credits.released == true)
		{
			SceneManager.changeScene(2);
		}
	}

	@Override
	public void draw(Graphics g) {
		// TODO Auto-generated method stub
		bg.draw(g);
		play.draw(g);
		instruction.draw(g);
		credits.draw(g);
	}	
}
